package com.example.mqttledmenu;

public class Config {//使用单例模式进行全局配置
    //public static String serverUrl = "http://192.168.0.108:8000/";
    public static String serverUrl = "https://android.nightowl.top/";
    public String user_id = "";
    public String avatar = "";
    public String department_tag = "";
    public String department_name = "";
    private static Config ApplicationConfig = new Config();

    //让构造函数为 private，这样该类就不会被实例化
    private Config() {
    }

    public static Config getInstance() {
        return ApplicationConfig;
    }

    public void setUserAvatar(String avatar) {
        this.avatar = avatar;
    }


    public void setUserId(String user_id) {
        this.user_id = user_id;
    }

    public void setDepartmentTag(String department_tag) {
        this.department_tag = department_tag;
    }

    public void setDepartmentName(String department_name) {
        this.department_name = department_name;
    }

    public String getUserId() {
        return user_id;
    }

    public String getAvatar() {
        return avatar.replace("\"", "");
    }

    public String getDepartmentTag() {
        return department_tag.replace("\"", "");
    }

    public String getDepartmentName() {
        return department_name.replace("\"", "");
    }
}
